<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<title>WavCAM - Smart IP Camera</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/lang/lang.js"></script>

<!-- Custom styles for this template -->
<link href="signin.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
		<script src="js/html5shiv.min.js"></script>
		<script src="js/respond.min.js"></script>
<![endif]-->

<script type="text/javascript">
var system_language = "";
var page_id = "login_page";

function getParameter(strParamName) {
var strURL = location.search;
var tmpParam = strURL.substring(1).split("&");
if(strURL.substring(1).length > 0)
{
var Params = new Array;
for(i=0;i<tmpParam.length;i++)
{
Params = tmpParam[i].split("=");
if(strParamName == Params[0])
{
return Params[1];
}
}
}
return "";
}


function style_display_on()
{
        return "table-row";
        /*if (window.ActiveXObject)
        { // IE
                return "block";
        }
        else if (window.XMLHttpRequest)
        { // Mozilla, Safari,...
                return "table-row";
        }*/
}

function page_init()
{
	init_language();
	if(getParameter("errno")=="401")
	{
		document.getElementById("error401").style.visibility = "visible";
		document.getElementById("error401").style.display = style_display_on();
		document.getElementById("error401").class = style_display_on();
	}
	document.login_form.username.focus();
}

</script>

</head>
<body onLoad="page_init()">

<div class="container">

    <form class="form-signin" role="form" name="login_form"  name="login_form" method="post" action="/action/login">
    <h2 class="form-signin-heading" align=center><img align=middle src="/pub/wavcamlogo.gif"> </h2>
    <input type="text" class="form-control" placeholder="Username" required autofocus ID="username" NAME="username">
    <input type="password" class="form-control" placeholder="Password" required ID="password" NAME="password">
    <button class="btn btn-lg btn-success btn-block" type="submit" id="btn_login" name="submit">Sign in</button>
		<p>

		<div id="error401" name="error401" style="display:none">
		<div class="alert alert-warning" role="alert">
			<span id="login_error">Please check your input name or password!</span>
		</div>
		</div>
    </form>


</div> <!-- /container -->
</body>
</html>